package com.p04.homework.one;

import java.util.Dictionary;

public class Test {

    public static void main(String[] args) {

        Army army =  new Army(5);
        //System.out.println(army.getWeaponSize());
        Tank tank = new Tank();
        //添加到武器库中
        army.addWeapon(tank);
        //System.out.println(army.getWeaponSize());
       // Tank tank2 = new Tank();
        //army.addWeapon(tank2);
        //System.out.println(army.getWeaponSize());
        WarShip warShip = new WarShip();
        army.addWeapon(warShip);
        //System.out.println(army.getWeaponSize());
        //WarShip warShip2 = new WarShip();
        //army.addWeapon(warShip2);
        //System.out.println(army.getWeaponSize());
        Flighter flighter = new Flighter();
        army.addWeapon(flighter);
        //System.out.println(army.getWeaponSize());
        //Flighter flighter2 = new Flighter();
        //army.addWeapon(flighter2);
        //System.out.println(army.getWeaponSize());
        //---------------------
        army.attackAll();
        System.out.println("---------------------");
        army.moveAll();
    }
}
